package entry34.pre;

import java.util.HashMap;
import java.util.Map;

public class OperationHelper {
	private static Map<String, Operation> map = new HashMap<String, Operation>();
	static {
		map.put("+", BasicOperation.PLUS);
		map.put("-", BasicOperation.MINUS);
		map.put("*", BasicOperation.TIMES);
		map.put("/", BasicOperation.DEVIDE);
		map.put("^", ExtendedOperation.EXP);
		map.put("%", ExtendedOperation.REMAINDER);
	}
	
	public static Operation op(String key) {
		return map.get(key);
	}
}
